package tech.aistar.corejava.day09;

/**
 * Created by 李雨昂 on 2019/7/25.
 */
public class TestEqualsDemo {
    public static void main(String[] args) {
        Student s1 = new Student(1,"1002");
        Student s2 = new Student(1,"1001");

        System.out.println(s1 == s2);

        System.out.println(s1.equals(s2));//false - 没有重写equals之前

        System.out.println(s1.equals(null));

        System.out.println(s1.equals(s1));

        System.out.println(s1.equals("abc"));

        System.out.println("===============");

        System.out.println(s1.equals(s2));

    }
}
